{* 
//////
//    @version [ Masterton ]
//    @package hwdVideoShare
//    @copyright (C) 2007 - 2009 Highwood Design
//    @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
//////
//    hwdVideoShare Template System:::This template system uses the Smarty Template Engine. 
//    For full documentation, including syntax usage please refer to http://www.smarty.net 
//    or our website at http://www.hwdmediashare.co.uk   
//////
//    This file generates the display for the video player page.
//////
//    VARIABLES AVAILBLE IN THIS TEMPLATE FILE:                                        
//    -- TO BE ADDED
//////
*}

{include file='header.tpl'}

{literal}
<script type="text/javascript">

/* Optional: Temporarily hide the "tabber" class so it does not "flash"
   on the page as plain HTML. After tabber runs, the class is changed
   to "tabberlive" and it will appear.
*/
document.write('<style type="text/css">.tabber{display:none;}<\/style>');

var tabberOptions = {

  /* Optional: instead of letting tabber run during the onload event,
     we'll start it up manually. This can be useful because the onload
     even runs after all the images have finished loading, and we can
     run tabber at the bottom of our page to start it up faster. See the
     bottom of this page for more info. Note: this variable must be set
     BEFORE you include tabber.js.
  */
  'manualStartup':true,

  /* Optional: code to run after each tabber object has initialized */

  'onLoad': function(argsObj) {
    /* Display an alert only after tab2 */
    if (argsObj.tabber.id == 'tab2') {
      alert('Finished loading tab2!');
    }
  },

  /* Optional: code to run when the user clicks a tab. If this
     function returns boolean false then the tab will not be changed
     (the click is canceled). If you do not return a value or return
     something that is not boolean false, */

  'onClick': function(argsObj) {

    var t = argsObj.tabber; /* Tabber object */
    var id = t.id; /* ID of the main tabber DIV */
    var i = argsObj.index; /* Which tab was clicked (0 is the first tab) */
    var e = argsObj.event; /* Event object */

    if (id == 'tab2') {
      return confirm('Swtich to '+t.tabs[i].headingText+'?\nEvent type: '+e.type);
    }
  },

  /* Optional: set an ID for each tab navigation link */
  'addLinkId': true

};

</script>




<SCRIPT LANGUAGE="JavaScript">

function copyit(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
}

</script>




{/literal}
<script type="text/javascript" src="{$link_home}/plugins/hwdvs-template/dark/js/tabber.js"></script>

{if $print_nextprev}
  <div style="float:right;">{$videoplayer->nextprev}</div>
{/if}
          
<h5 class="hwdheader">{$videoplayer->title} {$videoplayer->editvideo} {$videoplayer->deletevideo}</h5>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="{$player_width+15}" valign="top" style="overflow:hidden;">
      <div style="margin-right:5px;">
        <div class="standard"><div class="padding"><center>{$videoplayer->player}</center></div></div>
        <div class="tabber" id="tab1">
          {if $print_uservideolist}
          <div class="tabbertab">
            <h2>{$smarty.const._HWDVIDS_TITLE_MOREBYUSR} {$videoplayer->uploader}</h2>
            <div class="standard">
              <div class="padding">
                {foreach name=outer item=data from=$userlist}
                  {include file='video_list_simple.tpl'}
                {/foreach}
              </div>
            </div>
          </div>
          {/if}
          {if $print_relatedlist}
          <div class="tabbertab">
            <h2>{$smarty.const._HWDVIDS_RELATED}</h2>
            <div class="standard">
              <div class="padding">
                  {foreach name=outer item=data from=$listrelated}
                    {include file='video_list_simple.tpl'}
                  {/foreach}
              </div>
            </div>
          </div>
          {/if}
          {if $print_categoryvideolist}
          <div class="tabbertab">
            <h2>Category Videos</h2>
            <div class="standard">
              <div class="padding">
                  {foreach name=outer item=data from=$categoryvideolist}
                    {include file='video_list_simple.tpl'}
                  {/foreach}
              </div>
            </div>
          </div>
	  {/if}
	  {if $print_ads}{if $advert4}<div class="standard"><div class="padding"><div id="hwdadverts-nopadding">{$advert4}</div></div></div>{/if}{/if}
        </div>            
      </div>
    </td>
    <td valign="top">
      <div class="standard">
        <div class="padding">
	  {if $print_ads}{if $advert4}<div id="hwdadverts-nopadding">{$advert4}</div>{/if}{/if}

          {$videoplayer->ratingsystem}
          {if $print_videourl}
          <div>
            <h5 class="playertitle">{$smarty.const._HWDVIDS_TITLE_PERMALINK}</h5>
            <form name="vlink"><input type="text" value="{$videoplayer->videourl}" width="90%" onclick="copyit('vlink.vlink')" name="vlink" /></form>
          </div>
          {/if}
          {if $print_embedcode}
          <div>
            <h5 class="playertitle">{$smarty.const._HWDVIDS_INFO_VIDEMBEDCODE}</h5>
            <form name="elink"><input type="text" value="{$videoplayer->embedcode}" width="90%" onclick="copyit('elink.elink')" name="elink" /></form>
          </div>
          {/if}
          {if $print_description}<div style="width:100%;overflow:hidden;"><h5 class="playertitle">{$smarty.const._HWDVIDS_DESC}</h5>{$videoplayer->description}</div>{/if}
          {if $print_tags}<div style="width:100%;overflow:hidden;"><h5 class="playertitle">{$smarty.const._HWDVIDS_TAGS}</h5>{$videoplayer->tags}</div>{/if}
          <div style="width:100%;overflow:hidden;">{$videoplayer->category}</div>
          <div style="float:right;">
            <div class="padding">
              {$videoplayer->avatar}
            </div>
          </div>
          <div style="padding:5px;"/>
            <div>{$videoplayer->switchquality}</div>
            <div>{$videoplayer->downloadoriginal}</div>
            <div>{$videoplayer->vieworiginal}</div>
            <div>{$videoplayer->downloadflv}</div>
            <div id="addremfav">{$videoplayer->favourties}</div>
            <div>{$videoplayer->reportmedia}</div>
            <div style="clear:both;"></div>
            <div id="ajaxresponse"></div>
            <div style="clear:both;"></div>
          </div>
        </div>
        <div class="standard">
          <div class="padding">
            {$videoplayer->socialbmlinks}
          </div>
        </div>
        <div class="standard">
          <div class="padding">
            {if $print_addtogroup}{$videoplayer->addtogroup}<div id="add2groupresponse"></div>{/if}
          </div>
        </div>
        <!--{$videoplayer->views}-->
        <!--{$videoplayer->upload_date}-->
      </div>
    </td>
  </tr>
</table>

<div style="clear:both;"></div>

{if $print_comments}
  <h5 class="hwdheader">{$smarty.const._HWDVIDS_TITLE_VIDCOMMS}</h5>
  <div class="comments">{$videoplayer->comments}</div>
{/if}   

<script type="text/javascript">
  tabberAutomatic(tabberOptions);
</script>

{include file='footer.tpl'}
